<template>
<div class=" bg-newcolor">
    <div class="container clearfix">
        <div class="fl blueauth-detail-top">
            <img :src="authDetail.logo" alt="">
            <ul>
                <li><p>认证名称：</p>{{authDetail.title}}</li>
                <li><p>所属行业：</p>{{authDetail.title}}</li>
                <li><p>证书编号：</p>{{authDetail.number}}</li>
                <li><p>到期时间：</p>{{authDetail.expired_time}}</li>
                <li><p>发布机构：</p>{{authDetail.publish_agency}}</li>
            </ul>
        </div>
        <div class="blueauth-detail-right fl">
            <div class="video">
                <p>认证视频</p>
                <video :src="authDetail.video" controls="controls"></video>
            </div>
            <div class="video mgt-20">
                <p  class="mgt-20">认证介绍</p>
                <div class="introduct lh-30">{{authDetail.content}}</div>
            </div>
        </div>
    </div>
</div>
    
</template>




<script>
import jquery from '../../assets/js/jquery-1.10.2.min.js'
import axios from 'axios'
export default {
  name:'Blueauth_detail2',
  data(){
      return{
          authlist:{},
          authDetail:{}
      }
  },
  methods:{
    //   参数 ,{params:{id:that.authlist.id}}
      getAuthDetail () {
      var that=this
      axios.get('/certification/detail')
      .then(function(res){
        res = res.data
        that.authDetail = res.response,
        that.authDetail.content = that.getContent(res.response.content)
      })
    },
    getContent(value){
      var str=value.replace(/<[^>]+>/g, ""); //去除数据中的HTML标签
      var neirong=str.replace("&nbsp;","");//将&nbsp标签换成空格
      var wenben=neirong.replace( /^\s*/, '');//将空格去除掉
      if(wenben.length>0){
          return wenben;
      }
    }
  },
  created:function () {
      // 解决传过来的参数值在刷新页面后丢失
    this.authlist = JSON.parse(this.$route.params.authlist);
    this.getAuthDetail();
    this.$emit('public_header', false);
    this.$emit('public_headerhover', true);
    this.$emit('public_footer', true);
  },
}
</script>

<style>
 @import '../../../static/style/blueauth_detail2';
</style>